using BaseAmd.Mmt;
using SiemensAmd.Mmt;

namespace AmdContext
{
	public class ToolsFactory
	{
		public static IToolsHanding GetNewToolsHanding(ToolsApiTypeEnum? toolsApiType)
		{
			ToolsApiTypeEnum? toolsApiTypeEnum = toolsApiType;
			if (toolsApiTypeEnum.HasValue && toolsApiTypeEnum.GetValueOrDefault() == ToolsApiTypeEnum.SiemensMmt)
			{
				return SieMmtConfigIni();
			}
			return null;
		}

		private static IToolsHanding SieMmtConfigIni()
		{
			MmtHttpPost mmtHttpPost = new MmtHttpPost
			{
				HostIp = MmtConfigSession.MmtConfigEntity.ServerIp,
				CertificateName = MmtConfigSession.MmtConfigEntity.CertificateName
			};
			mmtHttpPost.Initialize();
			return mmtHttpPost;
		}
	}
}
